<template>
    <view class="columnbox wdh-100 content">
        <view class="columnbox wdh-100 one-comment" v-for="(item,index) in list" :key='index'>
            <view class="rowbox wdh-100 spb">
                <view class="rowbox" style="margin-bottom: 20rpx;">
                    <view class="comment-name">{{item.province}}患者</view>
                    <u-rate size="24rpx" style="margin-left: 10rpx;" active-color='#16d0ac' :count="5"
                        v-model="item.fraction"></u-rate>
                </view>
                <view class="comment-date">{{item.addtime}}</view>
            </view>
            <view class="comment-bq wdh-100">
                <view v-for="(bq,bqindex) in item.biaoqian.split(',')" :key='bqindex'>{{bq}}</view>
            </view>
            <view class="comment-detail wdh-100">{{item.title}}</view>
        </view>
    </view>
</template>

<script>
    export default {
        data() {
            return {
                id: 0,
                pageNo: 1,
                totalCount: 0,
                list: []
            };
        },
        onLoad(options) {
            this.id = options.id * 1
            this.getComment()
        },
        methods: {
            getComment() {
                this.$req.post('/user/pinluns', {
                    doctorid: this.id,
                    pageNo: this.pageNo,
                    pageSize: 20
                }).then(res => {
                    this.list = this.list.concat(res.data.data.data)
                    this.totalCount = res.data.data.totalCount
                })
            }
        }
    }
</script>

<style lang="scss" scoped>
    .content {
        font-family: PingFang SC;
        // background: #F5F8FB;
        // min-height: 100vh;
        // justify-content: flex-start;
    }

    .one-comment {
        margin-top: 32rpx;
        border-bottom: #F5F8FB solid 1px;
        padding-bottom: 32rpx;
    }

    .comment-name {
        font-size: 24rpx;
        color: #5e5f5f;

    }

    .comment-date {
        font-size: 24rpx;
        color: #bababa;
    }

    .comment-bq {
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-start;

        view {
            font-size: 24rpx;
            padding: 10rpx 20rpx;
            line-height: 24rpx;
            background: #f5f5f5;
            color: #7f7f7f;
            border-radius: 100rpx;
            margin-right: 20rpx;
            margin-bottom: 20rpx;
            transform: scale(.9);
        }
    }

    .comment-detail {
        font-size: 28rpx;
    }
</style>